package com.pmcc.core.web;

import com.pmcc.core.service.MenuService;
import com.pmcc.core.vo.CurrentUserVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by zhou on 2017/8/14.
 */
@RestController
@RequestMapping("api/v1/authority")
public class AuthorityController {

    @Autowired
    MenuService menuService;

    /**
     * 根据角色获取菜单列表
     * @return
     */
    @GetMapping(value = "getCurrentUser")
    @ResponseBody
    public CurrentUserVO getCurrentUser() {
        return menuService.getCurrentUser();
    }
}
